from channels.routing import ProtocolTypeRouter, URLRouter
from django.urls import path, include,re_path
from weichat import consumer
# application = ProtocolTypeRouter({
#     'websocket': URLRouter([
#         #     websocket路由与视图函数对应关系
#         path('chat/',consumer.CharConsumer)
#     ])
# })

websocket_urlpatterns = [
    re_path(r'room/(?P<group>\w+)/$', consumer.ChatConsumer.as_asgi())
]